﻿#if UNITY_EDITOR
using System.IO;
using UnityEditor;
using UnityEngine;
/// <summary>
/// 编辑器全局变量
/// </summary>
public partial class ESF_Utility
{
    #region Assets路径    
    /// <summary>
    /// 工程目录【Assets父目录】
    /// </summary>
    public readonly static string globalProjectFolderPath = Path.GetDirectoryName(Application.dataPath);
    /// <summary>
    /// Assets目录【"Assets/"目录】
    /// </summary>
    public readonly static string globalAssetsFolderPath = Application.dataPath;
    /// <summary>
    /// Assets目录名称【"Assets"】
    /// </summary>
    public readonly static string globalAssetsFolderName = Path.GetFileName(globalAssetsFolderPath);
    /// <summary>
    /// 保存日志文件目录
    /// </summary>
    public static string globalSaveLogFolder = Path.Combine(globalProjectFolderPath, "Logs");
    /// <summary>
    /// ScriptAssemblies目录【与"Assets"目录同级的"Library/ScriptAssemblies"】
    /// </summary>
    public readonly static string globalLibraryScriptAssembliesFolderPath = Path.Combine(globalAssetsFolderPath, "../Library/ScriptAssemblies").ESF_TransPathSeparatorCharToUnityChar();
    /// <summary>
    /// Unity\Editor\Data\Managed 目录
    /// </summary>
    public readonly static string globalUnityManagedDataDllPath = Path.Combine(EditorApplication.applicationContentsPath, "Managed").ESF_TransPathSeparatorCharToUnityChar();
    #endregion
}
#endif
